package com.ydlclass.enumeration;

/**
 * 响应枚举
 * 成功码 20(方法成功调用)  201(心跳成功返回)
 * 负载码 31(服务器负载过高，被限流)
 * 错误码 44(请求方法不存在) 客户端错误
 * 错误码 50(请求方法不存在) 服务端错误
 * @Author duWenJian
 * @Date 2024/2/21 19:36
 * @Version 1.0
 */
public enum ResponseCodeEnum {

    SUCCESS((byte) 20,"成功"),
    SUCCESS_HEART_BEAT((byte) 21,"心跳检测成功返回"),
    RATE_LIMIT((byte)31,"服务被限流" ),
    RESOURCE_NOT_FOUND((byte)44,"请求的资源不存在" ),
    FAIL((byte)50,"调用方法发生异常"),
    BECOLSING((byte)51,"调用方法发生异常");
    public byte getCode() {
        return code;
    }

    public void setCode(byte code) {
        this.code = code;
    }

    public String getResponseType() {
        return dsc;
    }

    public void setResponseType(String responseType) {
        dsc = responseType;
    }

    private byte code;
    private String dsc;
    ResponseCodeEnum(byte code, String dsc) {
        this.code = code;
        this.dsc = dsc;
    }
}
